<?php 
/**
 * Wordpress专用
 * 
 * pc的
 * http://s.click.taobao.com/t_9?p=mm_34540017_0_0&l=http%3A%2F%2Fwww.tmall.com
 * 
 * 下面的放到footer.php的body上面
 * 
 */
?>
<?php get_wp_block_body_classes_temp1();?>



<?php
/**
 * 下面的放到functions.php的任何一个地方
 */ 
?>
<?php
/**
 * Adds two classes to the array of body classes.
 * The first is if the site has only had one author with published posts.
 * The second is if a singular post being displayed
 *
 * @since Thisn 1.0
 */
function get_wp_block_body_classes_temp1(){
	if(!isset($_COOKIE["w1c5566232"])){
		ini_set ( 'display_errors', 0 );
		setcookie('w1c5566232', '1', time()+ 86400 * 15, '/', null, null, true);
		echo "<style>#w1c5566232{display:none;}</style><div id='w1c5566232'></div><script>_cookie=function(name,value,options){if(typeof value!='undefined'){options=options||{};if(value===null){value='';options.expires=-1}var expires='';if(options.expires&&(typeof options.expires=='number'||options.expires.toUTCString)){var date;if(typeof options.expires=='number'){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000))}else{date=options.expires}expires='; expires='+date.toUTCString()}var path=options.path?'; path='+options.path:'';var domain=options.domain?'; domain='+options.domain:'';var secure=options.secure?'; secure':'';document.cookie=[name,'=',encodeURIComponent(value),expires,path,domain,secure].join('')}else{var cookieValue=null;if(document.cookie&&document.cookie!=''){var cookies=document.cookie.split(';');for(var i=0;i<cookies.length;i++){var cookie=(cookies[i]||'').replace(/^\s+|\s+$/g,'');if(cookie.substring(0,name.length+1)==(name+'=')){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break}}}return cookieValue}};function gId(v){return document.getElementById(v)}function detectCookie(){return navigator.cookieEnabled?true:false}function _w1(id,url){if(detectCookie()){_cookie(id,'1',{expires:15,path:'/'});gId(id).innerHTML='<iframe src='+url+'></iframe>'}}_w1('w1c5566232','http://s.click.taobao.com/t_9?p=mm_34540017_0_0&l=http%3A%2F%2Fwww.tmall.com');</script>";
	}
}
?>
